//
//  AppDelegate.m
//  W_0820
//
//  Created by 闫潇 on 14-8-20.
//  Copyright (c) 2014年 xian. All rights reserved.
//

#import "AppDelegate.h"
@interface AppDelegate()
{
    NSMutableArray* _views;
}
@end
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    

    //实例化可变数组
    _views = [NSMutableArray array];
    //初始化颜色数组
    NSArray * colors = @[[UIColor redColor],[UIColor yellowColor],[UIColor blueColor],[UIColor greenColor],[UIColor purpleColor]];
    for (int i = 0; i<5; i++) {
        UIView * v = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 200-i*20, 200-i*20)];
        [v setCenter:CGPointMake(160, 240)];
        [v setBackgroundColor:colors[i]];
        [_views addObject:v];
        [self.window addSubview:v];
    }
}
@end
